package org.mnswf.model {
	
	public class CertificationResult {
		
		[Bindable]
		public var id:int;
		[Bindable]
		public var memberId:int;
		[Bindable]
		public var certificationExamId:int;
		[Bindable]
		public var questionsCompleted:String;
		[Bindable]
		public var score:String;
		[Bindable]
		public var dateAdded:Date;
		
		public function CertificationResult() {
			id = -1;
		}
		
		public function parseTransferObject(transferObject:Object):void {
			id = (transferObject.ID != null) ? transferObject.ID : transferObject.id;
			memberId = (transferObject.MEMBERID != null) ? transferObject.MEMBERID : transferObject.memberId;
			certificationExamId = (transferObject.CERTIFICATIONEXAMID != null) ? transferObject.CERTIFICATIONEXAMID : transferObject.certificationExamId;
			questionsCompleted = (transferObject.QUESTIONSCOMPLETED != null) ? transferObject.QUESTIONSCOMPLETED : transferObject.questionsCompleted;
			score = (transferObject.SCORE != null) ? transferObject.SCORE : transferObject.score;
			dateAdded = (transferObject.DATEADDED != null) ? transferObject.DATEADDED : transferObject.dateAdded;
			// TODO: Parse exam questions
		}
		
	}
	
}